package com.bms.hystrix.controller.zl;


import com.bms.hystrix.service.zl.CheekService;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping(value = "user", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class CheekController {

    @Resource
    private CheekService cheekService;
    /*
   这里类似于ribbon，提供一个对外访问的接口地址，
   然后根据serviceFeignByCheck接口来决定调用哪一个子模块服务和哪一个接口地址
    */
    @GetMapping("/selectAll")
    public Map check(String username) {
        return cheekService.check(username);
    }
}
